home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pesquisa Dirigida
/
Pesquisa Dirigida.iso
/
JOGOS
/
landerX.swf
/
scripts
/
frame_1
/
DoAction.as
< prev
Wrap
Text File
|
2005-01-07
|
1KB
|
63 lines
function breifingDelay(screenPause, whichBrief)
{
var cancel = false;
var skipWatch = whichBrief._currentframe;
briefingPause = setInterval(function()
{
if(skipWatch != whichBrief._currentframe)
{
clearInterval(briefingPause);
cancel = true;
briefingTimer = false;
}
if(!cancel)
{
if(briefingTimer)
{
if((getTimer() - briefingTimer) / 1000 >= screenPause)
{
briefingTimer = false;
clearInterval(briefingPause);
whichBrief.play();
}
}
else
{
briefingTimer = getTimer();
}
}
}
,250);
}
function GetUrlParam(strUrl, strParam)
{
var strUrlLC = strUrl.toLowerCase();
var nPos = strUrlLC.indexOf(strParam);
var nParamLen = strParam.length;
if(nPos > 0)
{
var nNumChars;
var nPosEnd = strUrlLC.indexOf("&",nPos + nParamLen);
if(nPosEnd > 0)
{
nNumChars = nPosEnd - nPos;
}
else
{
nNumChars = strUrl.length - nPos;
}
return strUrl.substr(nPos + nParamLen,nNumChars);
}
return "";
}
function GetBaseUrl(strUrl)
{
var nNumChars = strUrl.length;
var nPos = strUrl.indexOf("?",0);
if(nPos > 0)
{
nNumChars = nPos;
}
return strUrl.substr(0,nNumChars);
}